import { Inject, Injectable } from '@nestjs/common';
import { CreateUserActionDto } from './dto/create-user-action.dto';
import { PrismaService } from 'src/prisma.service';

@Injectable()
export class UserActionService {
  @Inject()
  prismaService: PrismaService;
  create(createUserActionDto: CreateUserActionDto) {
    return this.prismaService.userAction.create({
      data: {
        userId: createUserActionDto.userId,
        ip: createUserActionDto.ip,
        info: createUserActionDto.info,
        platform: createUserActionDto.platform,
      },
    });
  }
}
